package com.xx.springboot.designPattern.FactoryMode;/**
 * Created by xiaoxiunique on 2018-11-15.
 */

/**
 * <p>
 * TODO: 工厂模式
 * </p>
 *
 * @author hcg
 * @date 2018-11-15 15:33
 * @className PizzaStore
 */
public abstract class PizzaStore {
    public Pizza orderPizza(String type) {
        Pizza pizza;
        pizza = createPizza(type);

        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();
        return pizza;

    }
    abstract Pizza createPizza(String type);

}
